home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 751-760 / 756 / run68013 / run68013.readme < prev    next >
Text File  |  1995-03-18  |  6KB  |  139 lines

  1.  
  2. Program name:  Run68013 an upgrade from Run68010
  3.  
  4. Written with:  AssemPro (Profimat) assembler
  5.  
  6. Machine:       Standard Amiga 500 with OS1.3, One floppy drive,1 MByte RAM
  7.  
  8. Author:        Kamran Karimi
  9.  
  10. Source:        Included
  11.  
  12. Run methode:   From both WorkBench and Shell (As all Amiga Programs should)
  13.  
  14. What it does:  Emulates 11 of the 68020 instructions with a 68000
  15.  
  16. By the way:    Especial thanks to Nic Wilson for sending me SysInfo! 
  17.  
  18. Program status:This program is semi-shareware meaning that I would like to 
  19. receive money, books or software if you use this program, but it is not
  20. obligatory for poor Amiga users (I am one of them!).
  21. I retain the CopyWrite to to the program including the source and the
  22. executable form of it.
  23.  
  24. Directory contents:
  25.  Run68013 
  26.  Run68013.s 
  27.  Run68013.ReadMe 
  28.  
  29.  
  30.  This program  allows  you to run  programs  that  use the  11  of  the 68020 
  31. instructions.It copies its address at the illegal instruction exception vector
  32. and address error exception vector,then  when an exception occurs it examines 
  33. the instruction to see if it is one of the  instructions to be simulated and 
  34. if so simulates them with ordinary 68000 instructions.To do so it uses
  35. self-modifying code,which is rather unpleasant especially in systems that use
  36. caches,so do not run this program if you have a cache for only instruction 
  37. fetching ,because with a high probability it won't work correctly.This code
  38. is ofcourse not reentrent so it disables multitasking while simulating the
  39. instructions.
  40.  I have never worked with a real 68020 and have not seen the results of 
  41. executing the following instructions on it.My main reason to write this
  42. program was to enable my self to work with some interesting instructions of
  43. higher processores.
  44.  I tried to set the flag in the EXECBase structure to show that a 68010 is
  45. present in the system but for reasons unknown to me, the program would fail.
  46.  
  47.  
  48.  
  49. The commands that are recognized by the program are
  50.  
  51.  1)  RTD #<data>
  52.  2)  MOVEC Rn,CR ;MOVEC CR,Rn          
  53.  3)  MOVES.x Rn,<ea> ;MOVES.x <ea>,Rn
  54.  4)  MOVE CCR,<ea>
  55.  5)  LINK.L An,#<data>
  56.  6)  CAS.x Dc,Du,<ea>
  57.  7)  PACK Dn,Dm,#<data> ;PACK -(An),-(Am),#<data>
  58.  8)  UNPK Dn,Dm,#<data> ;UNPK -(An),-(Am),#<data>
  59.  9)  EXTB.L Dn
  60.  10) TRAPcc ;TRAPcc #<data>
  61.  11) BRA.L <label>
  62.  
  63. Rn=any general register, Dn=any data register, An=any addrress register
  64. CR=any control register,<ea>=an effective address, #<data>=immediate data
  65.  
  66.  Refer to an appropriate book for more information about these instructions
  67.  
  68.  The first 10 instructions cause an illegal instruction exception.the bra.l 
  69. causes an address error exception.
  70.  After the instruction is simulated the address of the next instruction will
  71. be put in the program counter and it will execute immediately.If you want to
  72. single step through a program that uses this code you should put a nop after
  73. each of the simulated instructions so that you can see the results.the nop
  74. will be executed right after that instruction.
  75.  
  76.  If none of these instructions were recognized then the program does the 
  77. following work: it pushes the address of the original illegal instruction
  78. vector in the SSP above the previous stack frame and pushes the previous SR
  79. after it but sets the supervisor bit and clears the trace bit,the system
  80. always does this after an exception, now by an rte,the processor begins 
  81. executing at the proper address with the original SR and PC on the stack.as 
  82. this section do not have a self-modifying code,it can be run on any computer,
  83. with or without cache.
  84.  
  85. Note:
  86.  none of the new 68020 addressing modes are supported.
  87.  in MOVEC instrcuction:
  88.   all the 68020 control registers are simulated by memory locations
  89.   both the MSP and ISP are interpreted as SSP.
  90.   if a value other than zero is copied in VBR, 1KByte of memory starting at
  91.   the new contents of the VBR are copied to the first KByte of memory to 
  92.   ensure the use of propper vectores.
  93.  in MOVES.x instruction:
  94.   no interpretation of the contents of the DFC or SFC are made during the move
  95.  the CAS instruction:
  96.    is ofcourse not indivisible.
  97.  
  98.  
  99.  Ordinary 68000 instrutions are used to simulate the above mentioned 
  100. instructions.as an example the EXTB.L instruction is made of ext.w and ext.l
  101. one after the other.only the bits that determine the operand are changed in 
  102. these two instructions according to information contained in the EXTB.L word
  103. on the stack. 
  104.  
  105.  To reduce the overhead of the code almost all of the registers have been used
  106. either as flags or to hold variables,this prevents accessing memory which is a
  107. time consuming process.
  108.  
  109.  
  110.  I have not tested the program under any other OS version or processor.Maybe
  111. someone will test it and kindly let me know about the results.I am not a good
  112. tester and can NOT guarantee this program to be bug-free.
  113.  
  114.  
  115.  You can pay for the program in three ways:
  116.  
  117. 1) Send a small donnation. 
  118.  
  119. 2) Send me computer books (especially Amiga books) ,Software or manuals you 
  120. don't need  any more, or even photocopies of articles in books or magazines
  121. containing Amiga programming guides or examples.
  122.  Here in Iran I have not much access to information on the Amiga so I would
  123. apreciate receiving technical information in any form. 
  124.  
  125. 3)Send me bug reports and mention the weak points of the program and the ways
  126. to improve it.My main reason of writing programs is to learn more.
  127.  
  128.  
  129.  
  130.  Send any bugs you find or any suggestions or donnations to
  131.  
  132.                Kamran Karimi
  133.                2,Hassanabad
  134.                Haghshenas  str.
  135.                Navab       str.
  136.                13599 - Tehran
  137.                Iran
  138.  
  139.